#include <QApplication>
#include <QObject>

#include "DGVImage.h"

int main(int argc, char *argv[])
{
    QApplication app(argc,argv);
    DGVImage Image;
    QFileDialog *fileOpener = new QFileDialog;

    QString filename = fileOpener->getOpenFileName(0,
                           QObject::tr("Select File to Open"),
                           ".",
                           QObject::tr("Images (*.png *.ppm *.pgm *.pbm *pnm *.tif *tiff *.jpeg *.jpg *.bmp)"));

    if(!Image.openImage(filename))
    {
        cerr << "Error Loading file" << endl;
        return EXIT_FAILURE;
    }

    Image.setScaledContents(true);
    Image.show();

	return app.exec();
}
